<!DOCTYPE HTML>
<html>
<head>
<script>
	window.onload = function(){
		var canvas = document.getElementById("myCanvas");
		var context = canvas.getContext("2d");
		context.lineWidth = 10;
		context.strokeStyle = "blue";
		
		context.beginPath();
		context.lineCap = "butt";
		context.moveTo(50, canvas.height/4);
		context.lineTo(canvas.width-50, canvas.height/4);
		context.stroke();
		
		context.beginPath();
		context.lineCap = "round";
		context.moveTo(50, canvas.height/2);
		context.lineTo(canvas.width-50, canvas.height/2);
		context.stroke();
		
		context.beginPath();
		context.lineCap = "square";
		context.moveTo(50, canvas.height*0.75);
		context.lineTo(canvas.width-50, canvas.height*0.75);
		context.stroke();
	}
</script>
</head>
<body>
	<canvas id="myCanvas" width="600" height="240" style="border:1px solid black;">
	</canvas>
</body>
</html>